interface FetchClassListAPIParams {
  page: string
  limit: string
}

interface FetchClassListAPIResData {
  code: number
  msg: string
  time: string
  data: {
    data: Class[]
    current_page: number
    total: number
    per_page: number
    last_page: number
  }
}

/**
 * @description 分页获取“在线选班查看更多”列表数据
 */
export function fetchClassListAPI(params: FetchClassListAPIParams, token: string) {
  return httpInstance.get<FetchClassListAPIResData, FetchClassListAPIParams>(
    '/api/classes/index',
    { params, headers: { token } },
  )
}
